home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / gfx / x11 / oldXlib.lha / oldXlib / src / lib / oldX / X10.h < prev    next >
C/C++ Source or Header  |  1994-04-18  |  3KB  |  91 lines

  1. /* $XConsortium: X10.h,v 11.12 94/04/17 20:11:33 jim Exp $ */
  2. /* 
  3.  * 
  4. Copyright (c) 1985, 1986, 1987  X Consortium
  5.  
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12.  
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15.  
  16. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  19. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22.  
  23. Except as contained in this notice, the name of the X Consortium shall not be
  24. used in advertising or otherwise to promote the sale, use or other dealings
  25. in this Software without prior written authorization from the X Consortium.
  26.  *
  27.  * The X Window System is a Trademark of X Consortium.
  28.  *
  29.  */
  30.  
  31.  
  32. /*
  33.  *    X10.h - Header definition and support file for the C subroutine
  34.  *    interface library for V10 support routines.
  35.  */
  36. #ifndef _X10_H_
  37. #define _X10_H_
  38.  
  39. /* Used in XDraw and XDrawFilled */
  40.  
  41. typedef struct {
  42.     short x, y;
  43.     unsigned short flags;
  44. } Vertex;
  45.  
  46. /* The meanings of the flag bits.  If the bit is 1 the predicate is true */
  47.  
  48. #define VertexRelative        0x0001        /* else absolute */
  49. #define VertexDontDraw        0x0002        /* else draw */
  50. #define VertexCurved        0x0004        /* else straight */
  51. #define VertexStartClosed    0x0008        /* else not */
  52. #define VertexEndClosed        0x0010        /* else not */
  53. /*#define VertexDrawLastPoint    0x0020     */      /* else don't */    
  54.  
  55. /*
  56. The VertexDrawLastPoint option has not been implemented in XDraw and 
  57. XDrawFilled so it shouldn't be defined. 
  58. */
  59.  
  60. /*
  61.  * XAssoc - Associations used in the XAssocTable data structure.  The 
  62.  * associations are used as circular queue entries in the association table
  63.  * which is contains an array of circular queues (buckets).
  64.  */
  65. typedef struct _XAssoc {
  66.     struct _XAssoc *next;    /* Next object in this bucket. */
  67.     struct _XAssoc *prev;    /* Previous obejct in this bucket. */
  68.     Display *display;    /* Display which ownes the id. */
  69.     XID x_id;        /* X Window System id. */
  70.     char *data;        /* Pointer to untyped memory. */
  71. } XAssoc;
  72.  
  73. /* 
  74.  * XAssocTable - X Window System id to data structure pointer association
  75.  * table.  An XAssocTable is a hash table whose buckets are circular
  76.  * queues of XAssoc's.  The XAssocTable is constructed from an array of
  77.  * XAssoc's which are the circular queue headers (bucket headers).  
  78.  * An XAssocTable consists an XAssoc pointer that points to the first
  79.  * bucket in the bucket array and an integer that indicates the number
  80.  * of buckets in the array.
  81.  */
  82. typedef struct {
  83.     XAssoc *buckets;        /* Pointer to first bucket in bucket array.*/
  84.     int size;            /* Table size (number of buckets). */
  85. } XAssocTable;
  86.  
  87. XAssocTable *XCreateAssocTable();
  88. char *XLookUpAssoc();
  89.  
  90. #endif /* _X10_H_ */
  91.